Linux DHCP服务实验报告 |
您所在的位置:网站首页 › linux dhcp服务器配置实验报告 › Linux DHCP服务实验报告 |
测试成功 4. 实验目标二:配置实现DHCP中继代理服务.
01.实验环境: 主服务器安装: [root@yang ~]# rpm -ihv /media/Server/dhcp-3.0.5-18.el5.i386.rpm 中继服务器安装:[root@yang ~]# rpm -ihv /media/Server/dhcp-3.0.5-18.el5.i386.rpm
02.主服务器配置:
①.[root@yang ~]# vim /etc/dhcpd.conf ddns-update-style interim; ignore client-updates; subnet 192.168.0.0 netmask 255.255.255.0 { option routers 192.168.0.1; option subnet-mask 255.255.255.0; option nis-domain "yangdong.com"; option domain-name "yangdong.com"; option domain-name-servers 61.147.37.1; option time-offset -18000; # Eastern Standard Time range dynamic-bootp 192.168.0.128 192.168.0.254; default-lease-time 21600; max-lease-time 43200; } subnet 192.168.1.0 netmask 255.255.255.0 { option routers 192.168.1.1; option subnet-mask 255.255.255.0; option nis-domain "yangdong.com"; option domain-name "yangdong.com"; option domain-name-servers 61.147.37.1; option time-offset -18000; # Eastern Standard Time range dynamic-bootp 192.168.1.128 192.168.1.254; default-lease-time 21600; max-lease-time 43200; }
②.重启服务器.
[root@yang ~]# service dhcpd restart 关闭 dhcpd: [确定] 启动 dhcpd: [确定]
03. 中继服务器配置
①.[root@hello ~]# rpm -ihv /media/Server/dhcp-3.0.5-18.el5.i386.rpm warning: /media/Server/dhcp-3.0.5-18.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186 Preparing... ########################################### [100%] 1:dhcp ########################################### [100%] [root@hello ~]# service dhcpd start 启动 dhcpd: [失败]
②.[root@hello ~]# vim /etc/sysctl.con 修改:net.ipv4.ip_forward = 1 //开启路由功能 [root@hello ~]# sysctl -p net.ipv4.ip_forward = 1 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.default.accept_source_route = 0 kernel.sysrq = 0 kernel.core_uses_pid = 1 net.ipv4.tcp_syncookies = 1 kernel.msgmnb = 65536 kernel.msgmax = 65536 kernel.shmmax = 4294967295 kernel.shmall = 268435456
③.[root@hello ~]# vim /etc/sysconfig/dhcrelay # Command line options here INTERFACES="eth0 eth1" DHCPSERVERS="192.168.0.20" [root@hello ~]# service dhcrelay start 启动 dhcrelay: [确定] ④.客户端测试
测试成功
|
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |